package com.blacktech.dbu.meta.dto;

import com.blacktech.dbu.core.dict.ColumnType;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 创建字段库请求DTO
 *
 * @author Yanyunsong
 */
@Data
public class CreateFieldLibraryRequest {

    @NotNull(message = "产品ID不能为空")
    private Long productId;

    @NotBlank(message = "字段中文名称不能为空")
    private String fieldNameCn;

    private String fieldNameEn;

    @NotNull(message = "字段类型不能为空")
    private ColumnType fieldType;

    private Integer fieldLength;

    private Integer fieldScale;

    private Boolean isRequired = false;

    private Boolean isPrimaryKey = false;

    private Boolean isUnique = false;

    private String defaultValue;

    private String fieldComment;

    private Boolean isEnabled = true;
}